Auto report unable to decrypt errors via lab option#4325
Auto report unable to decrypt errors via lab option#4325BillCarsonFr merged 10 commits intodevelopfrom
Conversation
73b143d to
f6dc2af
Compare
bmarty
left a comment
There was a problem hiding this comment.
Some small first remarks.
Weird to expose a ToDeviceService, but why not...
| import javax.inject.Inject | ||
|
|
||
| internal class DefaultToDeviceService @Inject constructor( | ||
| private val sendToDeviceTask: DefaultSendToDeviceTask, |
There was a problem hiding this comment.
The type must be SendToDeviceTask
| abstract fun bindToDeviceService(deviceService: DefaultToDeviceService): ToDeviceService | ||
|
|
||
| @Binds | ||
| abstract fun bindEventStreamService(deviceService: DefaultEventStreamService): EventStreamService |
There was a problem hiding this comment.
Could be grouped with the other services. Also rename param to service (at 2 places)
| private val listeners = mutableListOf<LiveEventListener>() | ||
|
|
||
| fun addLiveEventListener(listener: LiveEventListener) { | ||
| Timber.v("## VALR: addLiveEventListener") |
There was a problem hiding this comment.
use logger tag instead of VALR :)
There was a problem hiding this comment.
:) Updated, just a temporary log that I forgot to remove
7323137 to
cfa2f34
Compare
e9cf9e8 to
e56bb1a
Compare
| "device_id" to target.senderDeviceId, | ||
| "user_id" to target.senderUserId, | ||
| "sender_key" to target.senderKey, | ||
| "matching_issue" to reportUrl |
There was a problem hiding this comment.
matching_issue is a confusing name for this field, I'd expect that to be a link to a github issue or something; how would you feel about something more like recipient_rageshake?
There was a problem hiding this comment.
Sorry, didn't realize the rageshake server actually does create a github issue and responds with that; I'd had that disabled in my tests, and assumed we were looking at the URL of the submitted rageshake.
There was a problem hiding this comment.
I renamed matching_issue to recipient_rageshake.
Also align with the Z-UISI name for the issue label
793ac6b to
bbc7e4c
Compare
| android:defaultValue="false" | ||
| android:key="SETTINGS_LABS_USE_RESTRICTED_JOIN_RULE" | ||
| android:summary="@string/labs_use_restricted_join_rule_desc" | ||
| android:title="@string/labs_use_restricted_join_rule" /> |
There was a problem hiding this comment.
This removal will need more cleanup in the code, and not really related to this PR.
There was a problem hiding this comment.
Agreed will restore and creating separate PR
There was a problem hiding this comment.
Nice work! I don't see any issue like that. Performance wise, it should be ok I guess as long as there is not too many listeners on EventStreamService.
Other way of doing that is exposing Flows of event.
Maybe we should at least make them suspend methods? (LiveEventListener)
bbc7e4c to
a047bcb
Compare
Ktlint Results👍 ✅ 👍 |
Fixes #4263
Adds a new lab option to enable auto reporting of fail to decrypt errors. When detected the device will send a rageshake and then send a toDevice message to the other participant to request him to also upload a RS.
The AutoRageShake and UISIs detection part has been put in the app side, and in order to do that I added to new services in the SDK:
@ganfra / @bmarty If you could have a quick look on the SDK part and give some feedbaks
Sample report
https://github.com/matrix-org/element-android-rageshakes/issues/27579